import java.util.Scanner;

/*
 *@Student 张策
 */
public class Text {
    public static void main(String[] args) {
        System.out.println(isNum2("-9"));
        boolean aDouble = isDouble("-9");
    }
    public static boolean isDouble(String input){
        while (true) {
            double choice;
            try {
                choice = Double.parseDouble(input);
                if (choice > 0 && choice < 2000000) {
                    return true;
                }
            } catch (NumberFormatException e) {
                return false;
            }
            return false;
        }
    }
    public static boolean isNum2(String input){
        while (true) {
            int choice;
            try {
                choice = Integer.parseInt(input);
                if (choice >= 0 ) {
                    return true;
                } else {
                    return false;
                }
            } catch (NumberFormatException e) {
                return false;
            }
        }
    }
}
